var express = require('express');
var router = express.Router();
var Post = require('../modules/post');

module.exports = router;

//分类归档
router.get('/', function (req, res) {
  Post.getArchive(function(err,list){
    if(err)return res.redirect('/');
    res.render('archive',{
      title:'分类归档',
      user:req.session.user,
      list:list
    });
  });
});
